package com.jemmyee.pizza.service;

import java.io.Serializable;
import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.criterion.DetachedCriteria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jemmyee.core.dao.Page;
import com.jemmyee.pizza.dao.ICaiTypeDao;
import com.jemmyee.pizza.entity.CaiType;

@Service("caiTypeService")
public class CaiTypeServiceImpl implements ICaiTypeService<CaiType> {
	
	private static final Log log = LogFactory.getLog(CaiTypeServiceImpl.class);

	@Autowired
	private ICaiTypeDao caiTypeDao;


	public void delete(CaiType entity) {
		caiTypeDao.delete(entity);
	}

	public void deleteById(Serializable id) {
		caiTypeDao.deleteById(id);
	}

	public CaiType findById(Serializable id) {
		return caiTypeDao.findById(id);
	}

	public void save(CaiType entity) {
		caiTypeDao.save(entity);
	}

	public void update(CaiType entity) {
		caiTypeDao.update(entity);
	}

	public List<CaiType> findAll(CaiType entity) {
		return caiTypeDao.findAll(entity);
	}

	public Page findPageByCriteria(DetachedCriteria detachedCriteria,
			int pageSize, int startIndex,String order) {
		return caiTypeDao.findPageByCriteria(detachedCriteria, pageSize, startIndex, order);
	}

	public List<CaiType> findByProperty(String propertyName,
			Object value) {
		return caiTypeDao.findByProperty(new CaiType(), propertyName, value);
	}

	public List<CaiType> findAll() {
		return caiTypeDao.findAll(new CaiType());
	}

	public List<CaiType> findByCriteria(DetachedCriteria criteria) {
		return caiTypeDao.findByCriteria(criteria);
	}

	public void deleteAll(List<CaiType> list) {
		// TODO Auto-generated method stub
		
	}
}
